<?php $theme = "front"; ?>
<?php echo css("css/chocolat.css", $theme); ?>

<!--gallery-starts-->
<div class="gallery">
    <div class="container">
        <div class="gallery-top heading">
            <h1><?php echo $goodsClass['gc_name'] ?></h1>
        </div>
        <div class="col-md-9 gallery-bottom">
            <div class="gallery-1">
                <?php foreach ($goods as $g => $gv) { ?>
                    <div class="col-md-3 gallery-left">
                        <a href="<?php echo base_url($this->_site_path . '/goods/single/' . $gv['goods_id']); ?>">
                            <img class="lazyOwl" src="<?php echo image(base_url() . $gv['goods_images'], $theme); ?>" alt="<?php echo $gv['goods_name'] ?>" />
                            <h4><a href="<?php echo base_url($this->_site_path . '/goods/single/' . $gv['goods_id']); ?>"><?php echo $gv['goods_name'] ?></a></h4>
                        </a>
                    </div>    
                <?php } ?>
                <div class="clearfix"></div>
            </div>
        </div>

        <div class="col-md-3 blog-right">
            <?php
            $fields = array('gc_id', 'gc_name');
            $search['attributes']['gc_parent_id'] = 0;
            $classInfo = $this->goods_class_model->get_appoint_values($fields, null, $search);
            foreach ($classInfo as $ck => $cv) {
                echo '<div class="categories">';
                echo '<h3>' . $cv['gc_name'] . '</h3>';
                echo '<ul>';
                $search['attributes']['gc_parent_id'] = $cv['gc_id'];
                $childInfo = $this->goods_class_model->get_appoint_values($fields, null, $search);
                foreach ($childInfo as $key => $value) {
                    echo '<li><a href = "' . base_url($this->_site_path . '/goods/index/' . $value['gc_id']) . '">' . $value['gc_name'] . '</a></li>';
                }
                echo '</ul>';
                echo '</div>';
            }
            ?>
        </div>

        <div class="pagenatin">
            <div class="col-md-6">
                <nav><?php echo $pagination; ?></nav>
            </div>
            <div class="clearfix"> </div>
        </div>
    </div>

</div>	
<!----gallery-end---->